#pragma once
#include "StaticPage.h"

// extern "C" 
// { 
// #include "pdfapp.h" 
// }; 
// 
// #include "staticpage.h"
// static pdfapp_t gapp; 
// 
// static HDC hdc; 
// static HBRUSH bgbrush; 
// static HBRUSH shbrush; 
// static BITMAPINFO *dibinf; 
// static int justcopied = 0; 
// static fz_context *context; 

// CPageViewDlg form view

class CPageViewDlg : public CFormView
{
	DECLARE_DYNCREATE(CPageViewDlg)

protected:
	CPageViewDlg();           // protected constructor used by dynamic creation
	virtual ~CPageViewDlg();

public:
	enum { IDD = IDD_FORMVIEW_PAGEVIEW };
#ifdef _DEBUG
	virtual void AssertValid() const;
#ifndef _WIN32_WCE
	virtual void Dump(CDumpContext& dc) const;
#endif
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
public:
	void winblit();
protected:
	virtual void OnDraw(CDC* /*pDC*/);
public:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
public:
	int m_Dragging; 
	HCURSOR m_HCross; 
	CPoint m_PointOld; 
	CPoint m_PointOrigin; 
	CPoint m_PointStart;
	CPoint m_PointEnd;
	CStaticPage m_StaticPage;
	virtual void OnInitialUpdate();
public:
	void UpdateBookInfo();
	CRect m_RectSelectArea;
	int iSelectColor;
	void AlphaRectArea(CRect cr);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
};


